Storage device performance, such as of a magnetic storage device like a hard disk drive, is typically slower than the performance of other components within a computing system, such as processors and semiconductor memories. Therefore, efficiently writing to a file on such a storage device is important for the overall performance of a computing system. That is, the storage device performance can be the limiting factor to the overall performance of a computing system.
In many types of computing systems, such as those running versions of the Java® computing platform, it is common for many application programs to run concurrently, simultaneously, or in parallel, on a computing system at the same time. Stated another way, it is common for many application threads to be running in parallel on a computing system at the same time. An application thread is a separately executable computer program process that can be part of a larger computer program process or computer program. For instance, a given application computer program may have more than one application thread to achieve the functionality of the computer program.
Furthermore, in some types of technical areas, such as numerical computation, it is common for parallel computer programs to perform large amounts of file input/output (I/O) in relation to files stored on a storage device. That is, such technical areas involve computer programs in which large amounts of data that are constantly written to and/or read from files stored on a storage device. In such technical areas, therefore, it is common for a number of application threads to simultaneously perform writing operations to a storage device on a large scale.
Within the prior art, usually if a number of application threads are simultaneously writing to a storage device, each application thread writes to a different file on the storage device. This is because if the threads were to simultaneously write to the same file on the storage device, exclusive access to the file among the threads would have to be synchronized, such that parallelism in the execution of the application threads would be sacrificed. To avoid reducing or eliminating concurrency in the execution of the application threads, therefore, the prior art typically provides for each application thread writing to a different file on the storage device.
However, having each application thread write to a different file on the storage device deleteriously affects storage device performance. Storage device performance, which is already inherently lower than processor or memory performance, is affected by head seek time. The head of a storage device is its read/write mechanism, which converts changes in the magnetic field of the material on the magnetic surface to electrical signals and vice versa. For instance, hard disk drives usually contain one head for each surface that can be read from and written to.
Head seek time thus is the delay that occurs from the head of a storage device moving from one position on the magnetic surface, where one file is currently being written to, to another position on the magnetic surface, where another file is currently being written to. Therefore, having multiple application threads write to multiple files on the storage device concurrently means that the head of the storage device has to constantly move among a number of different positions on the magnetic surface. The storage device, in other words, spends more time moving the head among the number of different positions on the magnetic surface, and less time actually writing data to these different positions.
Thus, writing to a magnetic storage device like a hard disk drive is relatively fast where no or minimal head seek is performed. By comparison, where there are many or constant head seeks, writing to the magnetic storage device becomes very slow. The prior art achieves multiple application threads writing to multiple files on the storage device to secure parallelism of the multiple threads, but this conventional approach means that storage device performance is severely degraded. Such problems are further exacerbated by redundant array of independent disks (RAID) approaches to writing data to hard disk drives, and striping approaches to writing to hard disk drives, which increases the number of head seeks even further.
For these and other reasons, there is a need for the present invention.